package com.site.dao;


import com.site.pojo.OutStockDetail;

import java.sql.Connection;
import java.util.List;

/**
 * 出库明细表DAO
 */
public interface OutStockDetailDao {
    //查询所有
    List<OutStockDetail> selectAll();

    //按id查询
    OutStockDetail selectByid(Long id);

    //查询一个出库单下所属的出库明细单
    List<OutStockDetail> selectByoid(Long oid);

    //无事务，新增一个出库明细单
    int addOutStockDetail(OutStockDetail outStockDetail);

    //有事务，新增一个出库明细单
    int addOutStockDetail(Connection conn, OutStockDetail outStockDetail);

    //无事务，通过id删除出库明细单
    int deleteOutStockDetailByid(Long id);

    //有事务，通过id删除出库明细单
    int deleteOutStockDetailByid(Connection conn,Long id);

    //无事务，,通过outStockDetail.id修改出库明细单
    int updateOutStockDetail(OutStockDetail outStockDetail);

    //有事务，,通过outStockDetail.id修改出库明细单
    int updateOutStockDetail(Connection conn,OutStockDetail outStockDetail);
}
